<?php
/**
 * Created by PhpStorm.
 * User: 13264
 * Date: 2019/1/17
 * Time: 21:33
 */

namespace App\Handles;


use Monolog\Handler\StreamHandler;
use Monolog\Logger;

class BaseHandle
{
    protected $_logHandle;

    protected function _handleLog($name = 'log', $message = [])
    {
        $this->_logHandle = new Logger($name);

        $logDir = storage_path($name);
        $this->_logHandle->pushHandler(new StreamHandler($logDir . '/' . $name.'-'.date('Y-m-d'). '.log', Logger::INFO));

        $this->_logHandle->info('info',$message);
    }
}